package com.yunkeji.dao.mapper.sys;

import com.yunkeji.common.core.mapper.BaseMapperPlus;
import com.yunkeji.dao.domain.SysIpDeviceBanned;
import com.yunkeji.dao.vo.sys.SysIpDeviceBannedVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 封禁IP和设备记录Mapper接口
 *
 * @author yunkeji
 * @date 2024-09-26
 */
public interface SysIpDeviceBannedMapper extends BaseMapperPlus<SysIpDeviceBannedMapper, SysIpDeviceBanned, SysIpDeviceBannedVo> {
    /**
     * 查找过期时间大于当前时间的封禁记录
     * @return
     */
    @Select("select target from ykj_sys_ip_device_banned")
    List<String> selectTarget();

    @Select("select count(1) from ykj_sys_ip_device_banned where target = #{target}")
    Integer countByTarget(String target);


}
